<include file="header" />
<!--<link rel="stylesheet" href="/assets/base/electricity/css/index.css?ver={BEESCRM:$time}">-->
<body>
<div class="wraper">
    <div class="head clearfix">
	    <a href="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
        <span class="head-name pull-left">水费查询</span>
        <a href="{BEESCRM::U('base/waterFee/index',array('water_fee_id'=>$water_fee_id))}" class="iconfont icon-shouye pull-right text-right"></a>
    </div>
    <div class="margin-top">
	    <p class="form-box">
		    <select id="year">
			    <option value="0">年份选择</option>
			    <volist name="year" id="vo">
				    <option value="{BEESCRM:$vo}" <if condition="$nowYear eq $vo">selected</if>>{BEESCRM:$vo}年</option>
			    </volist>
		    </select>
		    <span class="triangle"></span>
	    </p>
	    <p class="form-box">
		    <select id="month">
			    <option value="0">月份选择</option>
			    <volist name="month" id="vo">
				    <option value="{BEESCRM:$vo}">{BEESCRM:$vo}月</option>
			    </volist>
		    </select>
		    <span class="triangle"></span>
	    </p>

		    <p class="form-box">
			    <select id="community">
				    <option value="0">请选择所在生活区</option>
				    <volist name="community" id="vo">
					    <option value="{BEESCRM:$vo.community_id}" data-num="{BEESCRM:$vo.community_code}" data-name="{BEESCRM:$vo.community_name}">{BEESCRM:$vo.community_name}</option>
				    </volist>
			    </select>
			    <span class="triangle"></span>
		    </p>
		    <p class="form-box">
			    <select id="building">
				    <option value="0">请选择楼幢</option>
			    </select>
			    <span class="triangle"></span>
		    </p>
		    <p class="form-box">
			    <select id="floor">
				    <option value="0">请选择楼层</option>
			    </select>
			    <span class="triangle"></span>
		    </p>
		    <p class="form-box">
			    <select id="room">
				    <option value="0">请选择房间</option>
			    </select>
			    <span class="triangle"></span>
		    </p>
	    </div>
	    <div class="btn-box">
		    <a href="javascript:void(0);" class="btn">立即查询</a>
	    </div>

       <!-- <p class="form-box">
            <select id="year">
                <option value="0">年份选择</option>
	            <volist name="year" id="vo">
		            <option value="{BEESCRM:$vo}">{BEESCRM:$vo}年</option>
	            </volist>
            </select>
            <span class="triangle"></span>
        </p>
	    <p class="form-box">
            <select id="month">
                <option value="0">月份选择</option>
	            <volist name="month" id="vo">
		            <option value="{BEESCRM:$vo}">{BEESCRM:$vo}月</option>
	            </volist>
            </select>
            <span class="triangle"></span>
        </p>
	    <p class="form-box">
            <select id="community">
                <option value="0">请选择所在生活区</option>
	            <volist name="community" id="vo">
		            <option value="{BEESCRM:$vo.community_id}">{BEESCRM:$vo.community_name}</option>
	            </volist>
            </select>
            <span class="triangle"></span>
        </p>
        <p class="form-box">
            <select id="building">
                <option value="0">请选择楼号</option>
            </select>
            <span class="triangle"></span>
        </p>
        <p class="form-box">
            <input value="" placeholder="请输入寝室号" id="room"/>
        </p>
    </div>
    <div class="btn-box">
        <a href="javascript:void(0);" class="btn">立即查询</a>
    </div>-->
</div>
<script src="/assets/base/waterfee/js/jquery-2.1.0.min.js"></script>
<script src="/assets/base/waterfee/js/swiper.min.js"></script>
<script src="/assets/base/waterfee/js/jq.utils.js"></script>
<script src="/assets/bower_components/sweetalert/lib/sweet-alert.min.js"></script>
<link rel="stylesheet" href="/assets/bower_components/sweetalert/lib/sweet-alert.css?v={BEESCRM:$time}">
<script src="/assets/base/common/ajaxgetroominfo.js"></script>

<script>
	$(function() {
		//调用房间联动js
		ajaxgetroominfo(true, true, true);
	});
    $('.tab-prize').on('click','.option',function(){
        if($(this).hasClass('other')){
            $(this).siblings().removeClass('checked');
        }
        else{
            $(this).toggleClass('checked').siblings().removeClass('checked');
        }
    });


	$(document).on('click','.btn',function(){
		var year = $('#year').val();
		var month = $('#month').val();
		var community_id = $('#community').val();
		var building_id = $('#building').val();
		var floor_id = $('#floor').val();
		var room_id = $('#room').val();

		if(year == 0){
			$.alert('error','请选择年份');
			return false;
		}

		if(month == 0){
			$.alert('error','请选择月份');
			return false;
		}

		if(community_id == 0){
			$.alert('error','请选择生活园区');
			return false;
		}

		if(building_id == 0){
			$.alert('error','请选择楼号');
			return false;
		}

		if(floor_id == 0){
			$.alert('error','请选择楼层');
			return false;
		}

		if(!room_id){
			$.alert('error','请填写寝室号');
			return false;
		}

		var str = "&year="+year+"&month="+month+"&room_id="+room_id+"&flag=1";
		window.location.href="/base/?m=waterFee&a=recharge&water_fee_id={BEESCRM:$water_fee_id}"+str;
    });
</script>
</body>
</html>